import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Creat by TanLei
 * Description:
 * User:86183
 * Date:2022-06-16
 * Time:13:51
 */
public class Test13 {
    public static void main(String[] args) {
        //默认清空原文件
        try(Writer writer = new FileWriter("./test.txt")){
            writer.write('x');
            writer.write('a');
            writer.write('w');
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
